{layout name="../common/master"/}
<div id="right">
    <div class="panel panel-default col-lg-4">
        <div class="panel-heading">
            <h3 class="panel-title">用户信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th>id</th>
                    <td><span style="color: green">{:substr($user['id'],0,30)}</span><span style="color: red">{:substr($user['id'],30)}</span></td>

                </tr>
                <tr>
                    <th>用户名</th>
                    <td>{$user['userName']}</td>
                </tr>
                <tr>
                    <th>用户信息审核状态</th>
                    {if condition="$user['admin_sms_status'] eq 1"}
                    <td>已通过</td>
                    {elseif condition="$user['admin_sms_status'] eq 2"/}
                    <td>不通过</td>
                    {elseif condition="$user['admin_sms_status'] eq 3"/}
                    <td>无短信</td>
                    {else/}
                    <td>未审核</td>
                    {/if}
                </tr>
                <tr>
                    <th>电话</th>
                    <td>{$user['userPhone']}</td>
                </tr>
                <!--<tr>-->
                    <!--<th>firstName</th>-->
                    <!--<td>{$user['firstName']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>lastName</th>-->
                    <!--<td>{$user['lastName']}</td>-->
                <!--</tr>-->
                <tr>
                    <th>状态</th>
                    <td>{$user['status']}</td>
                </tr>
                <tr>
                    <th>头像</th>
                    <td>{$user['headImg']}</td>
                </tr>
                <!--<tr>-->
                    <!--<th>年龄</th>-->
                    <!--<td>{$user['age']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>性别</th>-->
                    <!--<td>{$user['gender']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>生日</th>-->
                    <!--<td>{$user['birthDay']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>地址</th>-->
                    <!--<td>{$user['address']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>邮箱</th>-->
                    <!--<td>{$user['email']}</td>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th>银行卡号</th>-->
                    <!--<td>{$user['bankCard']}</td>-->
                <!--</tr>-->
                <tr>
                    <th>邀请人</th>
                    <td>{$user['invitor']}</td>
                </tr>
                <tr>
                    <th>注册时间</th>
                    <td>{$user['create_time']}</td>
                </tr>
                <!--<tr>-->
                    <!--<th>认证时间</th>-->
                    <!--<td>{$user['auth_time']}</td>-->
                <!--</tr>-->
                </tbody>
            </table>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title">银行卡信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th>id</th>
                    <td>{$userAccount['id']}</td>
                </tr>
                <tr>
                    <th>用户ID</th>
                    <td>{$userAccount['user_id']}</td>
                </tr>
                <tr>
                    <th>银行名称</th>
                    <td>{$userAccount['card_type']}</td>
                </tr>
                <tr>
                    <th>银行卡号</th>
                    <td>{$userAccount['ptm_card']}</td>
                </tr>
                <tr>
                    <th>IFSC</th>
                    <td>{$userAccount['nbfc_num']}</td>
                </tr>

                <tr>
                    <th>绑卡时间</th>
                    <td>{$userAccount['update_time']}</td>
                </tr>

                <tr>
                    <th>状态</th>
                    <td>
                        {if condition="$userAccount['is_valid'] eq 1"}
                        有效
                        {else /}
                        无效
                        {/if}
                    </td>
                </tr>

                </tbody>
            </table>
        </div>

       {if condition="!empty($useraccountList)"}
        <div class="panel-heading" style="color: red">
            <h3 class="panel-title">历史银行卡信息</h3>
        </div>
            {foreach name="useraccountList" item="vo" key="k"}
            <div class="panel-body" style="color: red">
                <table class="table table-hover table-bordered">
                    <tbody>
                    <tr>
                        <th>id</th>
                        <td>{$vo['id']}</td>
                    </tr>
                    <tr>
                        <th>用户ID</th>
                        <td>{$vo['user_id']}</td>
                    </tr>
                    <tr>
                        <th>银行名称</th>
                        <td>{$vo['card_type']}</td>
                    </tr>
                    <tr>
                        <th>银行卡号</th>
                        <td>{$vo['ptm_card']}</td>
                    </tr>
                    <tr>
                        <th>IFSC</th>
                        <td>{$vo['nbfc_num']}</td>
                    </tr>

                    <tr>
                        <th>绑卡时间</th>
                        <td>{$vo['update_time']}</td>
                    </tr>

                    <tr>
                        <th>状态</th>
                        <td>
                            {if condition="$vo['is_valid'] eq 1"}
                                <button type="button" uid="{$vo['id']}" class="toInvalid btn btn-danger">无效</button>
                            {else/}
                               无效
                            {/if}
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            {/foreach}
        {/if}
        <br>
        <div class="panel-heading">
            <h3 class="panel-title">个人认证
                {if condition="isset($userCerInfo['valid']) AND ($userCerInfo['valid'] eq 'approved')"}<button type="button" uid="{$userCerInfo['id']}" phone="{$userCerInfo['phoneNumber']}" id="cerInvalid" class="btn btn-danger"> 无效 </button>{/if} {if condition="isset($userCerInfo['valid']) AND ($userCerInfo['valid'] eq 'rejected')"}<button type="button" uid="{$userCerInfo['id']}" phone="{$userCerInfo['phoneNumber']}" id="sendSms" class="btn btn-danger"> 发送短信推送 </button>{/if}
            </h3>
        </div>

        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($userCerInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$userCerInfo['id']}</td>
                </tr>
                <tr>
                    <th>用户名</th>
                    <td>{$userCerInfo['firstname']} {$userCerInfo['middlename']} {$userCerInfo['lastname']}</td>
                </tr>
                <!--<tr>-->
                    <!--<th>性别</th>-->
                    <!--<td>{$userCerInfo['genderinfo']}</td>-->
                <!--</tr>-->
                <tr>
                    <th>电话</th>
                    <td>{$userCerInfo['phoneNumber']}</td>
                </tr>
                <tr>
                    <th>邮箱</th>
                    <td>{$userCerInfo['email']}</td>
                </tr>
                <!--<tr>-->
                    <!--<th>PANID</th>-->
                    <!--<td>{$userCerInfo['panID']}</td>-->
                <!--</tr>-->

                <tr>
                    <th>aadhaar正面</th>
                    <th>
                        <img src="{$userCerInfo['cardfrontUrl']}" alt="">

                    </th>
                </tr>

                <tr>
                    <th>aadhaar反面</th>
                    <th>
                        <img src="{$userCerInfo['cardbackUrl']}" alt="">
                    </th>

                </tr>
                <tr>
                    <th>aadhaarNum</th>
                    <td>{$userCerInfo['aadhaar_num']}</td>
                </tr>
                <tr>
                    <th>aadhaarPhoneNumber</th>
                    <td>{$userCerInfo['aadhaarPhoneNumber']}</td>
                </tr>
                <tr>
                    <th>验证时间</th>
                    <td>{$userCerInfo['valid_time']}</td>
                </tr>
                <tr>
                    <th>验证状态</th>
                    <td>{$userCerInfo['valid_status']}</td>
                </tr>
                <tr>
                    <th>创建时间</th>
                    <td>{$userCerInfo['createdAt']}</td>
                </tr>
                {/if}
                <tr>
                    <th>人脸识别
                        {if condition="isset($userFaceInfo['status']) AND ($userFaceInfo['status'] eq 0)"}<button type="button" id="faceInvalid" phone="{$userFaceInfo['user_phone']}" uid="{$userFaceInfo['id']}" class="btn btn-danger"> 无效 </button>{/if} {if condition="isset($userFaceInfo['status']) AND ($userFaceInfo['status'] eq 1)"}<button type="button" id="sendsms3" phone="{$userFaceInfo['user_phone']}" uid="{$userFaceInfo['id']}" class="btn btn-danger"> 发送短信和推送 </button>{/if}
                        </h3></th>
                    <td>  {foreach name="userFace" item="vo"}
                        <img class="userImg" src="data:image/png;base64,{$vo->image}" style="width: 100px">
                        {$vo->type}
                        {/foreach}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title">个人信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($personInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$personInfo['id']}</td>
                </tr>
                <tr>
                    <th>电话</th>
                    <td>{$personInfo['user_phone']}</td>
                </tr>
                <tr>
                    <th>birthDay</th>
                    <td>{$personInfo['birthDay']}</td>
                </tr>
                <tr>
                    <th>currentState</th>
                    <td>{$personInfo['currentState']}</td>
                </tr>
                <tr>
                    <th>currentCity</th>
                    <td>{$personInfo['currentCity']}</td>
                </tr>
                <tr>
                    <th>currentPinCode</th>
                    <td>{$personInfo['currentPinCode']}</td>
                </tr>
                <tr>
                    <th>currentAddress</th>
                    <td>{$personInfo['currentAddress']}</td>
                </tr>
                <tr>
                    <th>permanentState</th>
                    <td>{$personInfo['permanentState']}</td>
                </tr>

                <tr>
                    <th>permanentCity</th>
                    <td>{$personInfo['permanentCity']}</td>
                </tr>
                <tr>
                    <th>permanentaAddress</th>
                    <td>{$personInfo['permanentaAddress']}</td>
                </tr>
                <tr>
                    <th>permanentaPinCode</th>
                    <td>{$personInfo['permanentaPinCode']}</td>
                </tr>
                <tr>
                    <th>genderinfo</th>
                    <td>{$personInfo['genderinfo']}</td>
                </tr>
                <tr>
                    <th>panID</th>
                    <td>{$personInfo['panID']}</td>
                </tr>
                <tr>
                    <th>create_time</th>
                    <td>{$personInfo['create_time']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>
        <div class="panel-heading">
            <h3 class="panel-title">公司认证
                {if condition="isset($companyCerInfo['valid']) AND ($companyCerInfo['valid'] eq 'approved')"}<button type="button" id="comInvalid" phone="{$companyCerInfo['userPhone']}" uid="{$companyCerInfo['id']}" class="btn btn-danger"> 无效 </button>{/if}  {if condition="isset($companyCerInfo['valid']) AND ($companyCerInfo['valid'] eq 'rejected')"}<button type="button" phone="{$companyCerInfo['userPhone']}" uid="{$companyCerInfo['id']}" id="sendSms2" class="btn btn-danger"> 发送短信推送 </button>{/if}
            </h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                {if condition="empty($companyCerInfo)"}
                暂无认证
                {else /}
                <tr>
                    <th>id</th>
                    <td>{$companyCerInfo['id']}</td>
                </tr>
                <tr>
                    <th>公司名称</th>
                    <td>{$companyCerInfo['companyName']}</td>
                </tr>
                <tr>
                    <th>薪资水平</th>
                    <td>{$companyCerInfo['salaryRange']}</td>
                </tr>
                <tr>
                    <th>公司联系方式</th>
                    <td>{$companyCerInfo['companyContact']}</td>
                </tr>
                <tr>
                    <th>职位</th>
                    <td>{$companyCerInfo['titleRank']}</td>
                </tr>
                <tr>
                    <th>confirmAdmin</th>
                    <td>{$companyCerInfo['confirmAdmin']}</td>
                </tr>
                <tr>
                    <th>confirmPhone</th>
                    <td>{$companyCerInfo['confirmPhone']}</td>
                </tr>
                <tr>
                    <th>用户电话</th>
                    <td>{$companyCerInfo['userPhone']}</td>
                </tr>
                <tr>
                    <th>认证状态</th>
                    <td>{$companyCerInfo['valid_status']}</td>
                </tr>
                <tr>
                    <th>认证时间</th>
                    <td>{$companyCerInfo['validTime']}</td>
                </tr>
                <tr>
                    <th>有效状态</th>
                    <td>{$companyCerInfo['valid']}</td>
                </tr>
                {/if}
                </tbody>
            </table>
        </div>
    </div>

    <div class="panel panel-default col-lg-4">
        <div class="panel-heading">
            <h3 class="panel-title">crif分值
                {if condition="empty($criff)"}
                <button style="margin-left: 5px"   uuid="{$user['id']}" uid="{$user['userPhone']}" class="cibil btn btn-success btn-xs">获取crif评分</button>
                {else /}
                <button style="margin-left: 5px"  uuid="{$user['id']}" uid="{$user['userPhone']}" class="cibil btn btn-danger btn-xs">重新获取crif评分</button>
                {/if}
            </h3>
        </div>
        {if condition="!empty($criff)"}
    <div class="panel-body">
        <table class="table table-hover table-bordered">
            <tbody>
            <tr>
                <th>cutRefNum</th>
                <td>{$criff['cutRefNum']}</td>
            </tr>
            <tr>
                <th>分值</th>
                <td>{$criff['scoreValue']}</td>
            </tr>
            <tr>
                <th>类型</th>
                <td>{$criff['scoreType']}</td>
            </tr>
            <tr>
                <th>详情</th>
                <td>{$criff['scoreComments']}</td>
            </tr>
            <tr>
                <th>错误描述</th>
                <td>{$criff['errorDescription']}</td>
            </tr>
            <tr>
                <th>errorCode</th>
                <td>{$criff['errorCode']}</td>
            </tr>
            <tr>
                <th>创建时间</th>
                <td>{$criff['create_time']}</td>
            </tr>


            </tbody>
        </table>
    </div>
        {else /}
         <div>
           <td>暂无数据</td>
         </div>
        {/if}


        <div class="panel-heading">
            <h3 class="panel-title">产品信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th>id</th>
                    <td>{$product['id']}</td>
                </tr>
                <tr>
                    <th>产品名</th>
                    <td>{$product['name']}</td>
                </tr>
                <tr>
                    <th>价格</th>
                    <td>{$product['price']}</td>
                </tr>
                <tr>
                    <th>年利率</th>
                    <td>{$product['product_rate']}</td>
                </tr>
                <tr>
                    <th>逾期费率</th>
                    <td>{$product['overdue_rate']}</td>
                </tr>
                <tr>
                    <th>信审费</th>
                    <td>{$product['info_check_fee']}</td>
                </tr>
                <tr>
                    <th>管理费</th>
                    <td>{$product['manage_fee']}</td>
                </tr>
                <tr>
                    <th>产品时长</th>
                    <td>{$product['period']}</td>
                </tr>
                <tr>
                    <th>是否上架</th>
                    <td>{$product['is_valid']}</td>
                </tr>
                <tr>
                    <th>创建时间</th>
                    <td>{$product['createdAt']}</td>
                </tr>

                </tbody>
            </table>
        </div>

    </div>

 <div class="panel panel-default col-lg-4">
        <div class="panel-heading">
            <h3 class="panel-title">借款信息</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover table-bordered">
                <tbody>
                <tr>
                    <th>id</th>
                    <td><span style="color: green">{:substr($userLoan['id'],0,30)}</span><span style="color: red">{:substr($userLoan['id'],30)}</span></td>
                </tr>
                <tr>
                    <th>用户ID</th>
                    <td>{$userLoan['userID']}</td>
                </tr>
                <tr>
                    <th>用户电话</th>
                    <td>{$userLoan['userPhone']}</td>
                </tr>
                <tr>
                    <th>产品ID</th>
                    <td>{$userLoan['productID']}</td>
                </tr>
                <tr>
                    <th>借款金额</th>
                    <td>{$userLoan['loanAmount']}</td>
                </tr>
                <tr>
                    <th>借款交易ID</th>
                    <td>{$userLoan['transactionID']}</td>
                </tr>
                <tr>
                    <th>借款交易状态</th>
                    <td>
                        {if condition="$userLoan['transactionStatus'] eq 0"}
                        <span style="color: orangered">未产生交易</span>
                        {elseif condition="$userLoan['transactionStatus'] eq 1"/}
                        <span style="color: green">交易成功</span>
                        {elseif condition="$userLoan['transactionStatus'] eq 2"/}
                        <span style="color: red">交易不成功</span>
                        {elseif condition="$userLoan['transactionStatus'] eq 3"/}
                        <span style="color: red">交易中</span>
                        {/if}
                    </td>
                </tr>
                <tr>
                    <th>借款时长</th>
                    <td>{$userLoan['loanRepayPeriod']}</td>
                </tr>
                <tr>
                    <th>管理费</th>
                    <td>{$userLoan['managementFee']}</td>
                </tr>
                <tr>
                    <th>年利率</th>
                    <td>{$userLoan['loanInterestRate']}</td>
                </tr>
                <tr>
                    <th>实际借款金额</th>
                    <td>{$userLoan['actualAmount']}</td>
                </tr>
                <tr>
                    <th>使用的优惠券ID</th>
                    <td>{$userLoan['couponID']}</td>
                </tr>
                <tr>
                    <th>用户借款状态</th>
                    <td>{$userLoan['userStatus']}</td>
                </tr>
                <tr>
                    <th>审核ID</th>
                    <td>{$userLoan['auditProcessID']}</td>
                </tr>
                <tr>
                    <th>审核状态</th>
                    <td>
                        {if condition="$userLoan['auditProcessStatus'] eq 0"}
                        <span style="color: orangered">待审核</span>
                        {elseif condition="$userLoan['auditProcessStatus'] eq 1"/}
                        <span style="color: green">审核通过</span>
                        {elseif condition="$userLoan['auditProcessStatus'] eq 2"/}
                        <span style="color: red">审核不通过</span>
                        {/if}
                    </td>
                </tr>
                <tr>
                    <th>借款提交时间</th>
                    <td>{$userLoan['loanSubmitTime']}</td>
                </tr>
                <tr>
                    <th>借款发放时间</th>
                    <td>{$userLoan['loanArrangedTime']}</td>
                </tr>
                <tr>
                    <th>还款状态</th>
                    <td>
                        {if condition="$userLoan['loanRepayStatus'] eq 0"}
                        <span style="color: orangered">未产生还款</span>
                        {elseif condition="$userLoan['loanRepayStatus'] eq 1"/}
                        <span style="color: green">待还款</span>
                        {elseif condition="$userLoan['loanRepayStatus'] eq 2"/}
                        <span style="color: red">还款中</span>
                        {elseif condition="$userLoan['loanRepayStatus'] eq 3"/}
                        <span style="color: blue">还款完成</span>
                        {/if}
                    </td>
                </tr>
  <tr>
                    <th>审核费用</th>
                    <td>{$userLoan['auditFee']}</td>
                </tr>
  <tr>
                    <th>总计还款</th>
                    <td>{$userLoan['totalRepay']}</td>
                </tr>
  <tr>
                    <th>逾期费率</th>
                    <td>{$userLoan['overdueRate']}</td>
                </tr>
                <tr>
                    <th>创建时间</th>
                    <td>{$userLoan['createdAt']}</td>
                </tr>

                </tbody>
            </table>
        </div>
    </div>


</div>
{if condition="$_GET['type'] eq 2"}
<div class="btn-group">
    <button id="pass" uid={$loanCheck['id']} type="button" class="btn btn-success">审核通过</button>
    <button id="nopass" uid={$loanCheck['id']} type="button" class="btn btn-danger">审核不通过</button>
</div>
{/if}
<script>
    var id={$_GET['uid']};
    $("#pass").click(function(){
        layer.open({
            title: '请填写原因'
            ,content: '<textarea id="yuan2">pass</textarea>',
            yes:function(){

                var index = layer.load(2, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });
                var content=$("#yuan2").val();
                var url="{:URL('home/Check/checkPass')}";
                url=url+"?type=1&id="+id+'&content='+content;
                $.get(url,function(res){
                    layer.close(index);
                    if(res['code'] != 0){
                        layer.alert(res.data)
                    }else{
                        layer.alert('success');
                        location.href="{$_SERVER['HTTP_REFERER']}";
                    }
                })
            }
        });
    })
    $("#nopass").click(function(){
        layer.open({
            title: '请填写原因'
            ,content: `<select name="name" id="yuan" class="form-control">
                <option value="Risk SMS">Risk SMS</option>
                <option value="FlashCash（Use the same phone）">FlashCash（Use the same phone）</option>
                <option value="Invalid company name">Invalid company name</option>
                <option value="Not the same person">Not the same person</option>
                <option value="Crif《600">Crif《 600</option>
        <option value="600《Crif《650, No SMS"> 600《Crif《650, No SMS </option>
        <option value="600《Crif《650, Risk SMS"> 600《Crif《650, Risk SMS </option>
        <option value="600《Crif《650, FlashCash（Use the same phone）"> 600《Crif《650, FlashCash（Use the same phone）</option>
        <option value="600《Crif《650, Invalid company name">600《Crif《650, Invalid company name</option>
        <option value="600《Crif《650, Not the same person">600《Crif《650, Not the same person</option>
        <option value="600《Crif《650, Age《1985">600《Crif《650, Age<1985</option>
        <option value="Crif0, No SMS">Crif0, No SMS</option>
        <option value="Crif0, Risk SMS">Crif0, Risk SMS</option>
        <option value="Crif0, FlashCash（Use the same phone）">Crif0, FlashCash（Use the same phone）</option>
        <option value="Crif0, Invalid company name">Crif0, Invalid company name</option>
        <option value="Crif0, Not the same person">Crif0, Not the same person</option>
        <option value="Crif0, Age<1985">Crif0, Age<1985</option>
        </select>`,
            yes:function(){
                var index = layer.load(2, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });
                var content=$("#yuan").val();
                var url="{:URL('home/Check/checkPass')}";
                url=url+"?type=0&id="+id+'&content='+content;
                $.get(url,function(res){
                    layer.close(index);
                    if(res['code'] != 0){
                        layer.alert(res.data);
                    }else{
                        layer.alert('success');
//                        location.href="{:URL('home/check/checkingList')}";
                        location.href="{$_SERVER['HTTP_REFERER']}";
                    }
                })
            }
        });
    })

    $(".cibil").click(function () {
        var uid=$(this).attr("uid");
        var uuid=$(this).attr("uuid");
        $.post("{:URL('home/Check/getCriff')}",{uuid:uuid,uid:uid,},function(res){
            if(res.code ==0){
                layer.alert(res.msg);
                location.reload();
            }else{
                layer.alert(res.msg);
                location.reload();
            }
        })
    })

    $(".toInvalid").click(function () {
        var uid=$(this).attr("uid");
        $.post("{:URL('home/Check/updateBank')}",{uid:uid},function(res){
            if(res.code ==0){
                layer.alert(res.msg);
                location.reload();
            }else{
                layer.alert(res.msg);
                location.reload();
            }
        })
    })

    $("#cerInvalid").click(function(){
        var loan_check_id="{$_GET['uid']}";
        var usercerId="{$userCerInfo['id']}";
        var phone="{$user['userPhone']}";
        $.post("{:URL('home/User/updateUsercer')}",{loan_check_id:loan_check_id,usercerId:usercerId,phone:phone}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })

    $("#comInvalid").click(function(){
        var loan_check_id="{$_GET['uid']}";
        var userComCerId="{$companyCerInfo['id']}";
        var phone="{$user['userPhone']}";
        $.post("{:URL('home/User/updateComcer')}",{loan_check_id:loan_check_id,phone:phone,userComCerId:userComCerId}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })

    $("#faceInvalid").click(function(){
        var loan_check_id="{$_GET['uid']}";
        var userFaceId=$(this).attr('uid');
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/updateUserface')}",{userFaceId:userFaceId,phone:phone,loan_check_id:loan_check_id}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
    $("#sendSms").click(function () {
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/sendSms')}",{phone:phone,type:1}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
    $("#sendSms2").click(function () {
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/sendSms')}",{phone:phone,type:2}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
    $("#sendsms3").click(function () {
        var phone=$(this).attr('phone');
        $.post("{:URL('home/User/sendSms')}",{phone:phone,type:3}, function (res) {
            if(res.code == 0){
                layer.alert("success");
                location.reload();
            }else{
                layer.alert(res.data);
                location.reload();
            }
        })
    })
</script>